package com.lzy.health.entity;

import com.lzy.health.pojo.CheckItem;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 封装返回结果
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result implements Serializable {
    private boolean flag;//执行结果，true为执行成功 false为执行失败
    private String message;//返回结果信息
    private Object data;//返回数据
    private Long total;
    private List rows;
    private PageResult pageResult;
    private CheckItem checkItem;

    public Result(boolean flag, String message) {
        this.flag = flag;
        this.message = message;
    }

    public Result(boolean flag, String message, PageResult pageResult) {
        this.flag=flag;
        this.message=message;
        this.pageResult=pageResult;
    }

    public Result(boolean flag, String message, CheckItem checkItem) {
        this.flag = flag;
        this.message = message;
        this.checkItem = checkItem;
    }
}
